function validateDate(dateStr) {
	let date = new Date(Date.parse(dateStr) )
	return (date instanceof Date) && !isNaN(date.getTime())
}
export function dateFormatter(cellValue, formatType) {
    if (!validateDate(cellValue)) {
		return cellValue;
	}
    return new Date(cellValue).format(formatType)
}
export function formatDate1(date) {
	if (!validateDate(date)) {
		return date;
	}

	return new Date(date).format('YYYY-MM-DD')
}

export function formatDate2(date) {
	if (!validateDate(date)) {
		return date;
	}

	return new Date(date).format('YYYY/MM/DD')
}

export function formatDate3(date) {
	if (!validateDate(date)) {
		return date;
	}

	return new Date(date).format('YYYY年MM月DD日')
}

export function formatDate4(date) {
	if (!validateDate(date)) {
		return date;
	}

	return new Date(date).format('YYYY-MM-DD hh:mm:ss')
}

export function formatDate5(date) {
	if (!validateDate(date)) {
		return date;
	}

	return new Date(date).format('YYYY-MM-DD hh:mm:ss')
}
